public class SimpleLocation extends Location {
	public SimpleLocation(int x, int y, int z) {
		super((double) x, (double) y, (double) z);
	}
	public SimpleLocation(double x, double y, double z) {
		super(x, y, z);
	}
	public SimpleLocation(Location l) {
		super(l.x, l.y, l.z, l.rotX, l.rotY);
	}
	
	public Location toLocation() {
		return new Location(x,y,z,rotX,rotY);	
	}
	public Block getBlock() {
		return etc.getServer().getBlockAt((int) x, (int) y, (int) z);
	}
	public int getBlockID() {
		return etc.getServer().getBlockIdAt((int) x, (int) y, (int) z);
	}
	public void setBlock(int id) {
		etc.getServer().setBlockAt(id, (int) x, (int) y, (int) z);
	}
  	public SimpleLocation add(SimpleLocation l) {
		return new SimpleLocation(x + l.x, y + l.y, z + l.z);
	}
	public void addMe(SimpleLocation l) {
		x += l.x;
		y += l.y;
		z += l.z;
	}
	public SimpleLocation subtract(SimpleLocation l) {
		return new SimpleLocation(x - l.x, y - l.y, z - l.z);
	}
	public void subtractMe(SimpleLocation l) {
		x -= l.x;
		y -= l.y;
		z -= l.z;
	}
	public SimpleLocation multiply(int d) {
		return new SimpleLocation(x * d, y * d, z * d);
	}
	public void multiplyMe(int d) {
		x *= d;
		y *= d;
		z *= d;
	}
	
	@Deprecated
	public SimpleLocation down() {
		return new SimpleLocation(x, y-1, z);
	}
	@Deprecated
	public SimpleLocation down(int d) {
		return new SimpleLocation(x, y-d, z);
	}
	@Deprecated
	public void downMe() {
		y -= 1;
	}
	@Deprecated
	public void downMe(int d) {
		y -= d;
	}

	@Deprecated
	public SimpleLocation up() {
		return new SimpleLocation(x, y+1, z);
	}
	@Deprecated
	public SimpleLocation up(int d) {
		return new SimpleLocation(x, y+d, z);
	}
	@Deprecated
	public void upMe() {
		y += 1;
	}
	@Deprecated
	public void upMe(int d) {
		y += d;
	}

	public SimpleLocation move(CardinalDirection direction) {
		return new SimpleLocation(this.add(direction.toVector()));
	}
	public SimpleLocation move(CardinalDirection direction, int amount) {
		return new SimpleLocation(this.add(direction.toVector().multiply(amount)));
	}
	public void moveMe(CardinalDirection direction) {
		addMe(direction.toVector());
	}
	public void moveMe(CardinalDirection direction, int amount) {
		addMe(direction.toVector().multiply(amount));
	}
}
